<template>
	<view class="page">
		<template v-if="showDetail">
			<view class="pageH">
			
			</view>
			<view class="pageS">
				
				
			</view>
			<view class="pageF">
			
			</view>
		</template>
		<template v-else>
			<more-data type="loading"></more-data>
		</template>
	</view>
</template>

<script setup>
	import {
		onLoad,
		onShow,
		onReachBottom,
		onShareAppMessage
	} from '@dcloudio/uni-app'
	import {
		ref,
		reactive,
		getCurrentInstance
	} from 'vue'
	// 公用方法
	let {
		proxy
	} = getCurrentInstance();
	let $js = proxy.$js;

	// 页面加载完成
	onLoad((e => {
		// 获取详情
		getDetailFun(e.id);
	}))
	// 详情数据
	let detail = ref({});
	// 是否显示详情
	let showDetail = ref(false);
	// 获取详情
	function getDetailFun(id){
		$js.ajax("GET", `/carton/system/${id}`, {}).then((res) => {
			if (res.code == 200) {
				showDetail.value = true;
				let data = res.data;
				
				detail.value = data;
			} else {
				$js.tiShi(res.msg);
			}
		})
	}
	
	// 分享
	onShareAppMessage(() => {
		return $js.getShareObjFun();
	})
</script>

<style lang="scss" scoped>
	.page {
		padding: 20rpx 24rpx;
	}

	.pageH {}

	.pageS {}

	.pageF {}
</style>